package com.example.haiti_infrastructure_prototype;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class QuestionnaireActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_questionnaire);
        
        //Sets click listener for questionnaire button
        Button btnQuestionnaire = (Button)findViewById(R.id.btnNext);
        btnQuestionnaire.setOnClickListener(nButton);   
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;                         
    }
    
  //---create an anonymous class to act as a button click listener---
    private OnClickListener nButton = new OnClickListener()
    {
        public void onClick(View v)
        {                         
            Toast.makeText(getBaseContext(), 
                    "Next Page!", 
                    Toast.LENGTH_LONG).show();
        }
    }; 
}
